package com.tuanzi.webtalk.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.View;

import javax.servlet.http.HttpSession;

/**
 * 雄关漫道真如铁，而今迈过从头越
 **/

/**
 * 这个控制器是用来退出的时候去除session用的
 */

@Controller
public class LogoutController {

    @RequestMapping(value = "/user/logout")
    @ResponseBody
    public String logout(HttpSession session){
        session.removeAttribute("user");
        return "ok";
    }

}
